#ifndef PATTERN_H
#define PATTERN_H

#include "free-cube/notation.h"
#include "free-cube/freecube.h"
#include "free-cube/datamidi.h"
#include <QString>
#include <QList>

class Pattern
{
public:
    enum Exceptions {k_cant_open_file,
                     k_wrong_header_size,
                     k_wrong_number_of_tracks};
    Pattern();
    ~Pattern();
    void get_data(fc::DataList & data, fc::TimeT ticks_from, fc::TimeT ticks_to);
    bool load(const QString & name_of_file_);
    void clear();

private:
    int n_mesures_; // in measures
    fc::Duration duration_of_measure_; // size of mesure
    int n_of_tracks_;
    QList <int> notes_;
    typedef QList <int> Mesure;
    QList <Mesure*> track_;
    bool is_loaded_;
    QString name;
    int ticks_per_mesure_;
};

#endif // PATTERN_H
